;;; parens.cfg.el --- Summary
;;; Commentary:
;;; parentheses configuration
;;; Code:

(require 'package.cfg)

(defun enable-rainbow-delimiters (mode-hook)
  (add-hook mode-hook 'rainbow-delimiters-mode))

(defvar on-mode-hooks
  '(emacs-lisp-mode-hook python-mode-hook js2-mode-hook shell-mode-hook shell-script-mode-hook sh-mode))

(package-install-if-absent 'rainbow-delimiters)
(use-package rainbow-delimiters
  :init
  (mapc 'enable-rainbow-delimiters on-mode-hooks))

(package-install-if-absent 'smartparens)
(use-package smartparens-config
  :ensure smartparens
  :init
  (add-hook 'minibuffer-setup-hook 'turn-on-smartparens-strict-mode)
  :config
  (show-smartparens-global-mode t)
  (smartparens-global-mode t)
  (sp-use-smartparens-bindings)
  (sp-local-pair 'minibuffer-inactive-mode "'" nil :actions nil)
  :diminish smartparens-mode)

(provide 'parens.cfg)
;;; parens.cfg.el ends here
